import request from '@/utils/request'

export default{

    /**
     * 根据视频id删除云端视频
     * @param {视频id} videoId 
     * @returns 
     */
    delVodById(videoId){
        return request({
            url: '/eduvideo/vod/deleteAlyVideo/' + videoId,
            method: 'delete'
        })
    },

    /**
     * 添加小节
     * @param {要添加的小节表单}} video 
     * @returns 
     */
    addVideo(video){
        return request({
            url: '/eduservice/video/addVideo',
            method: 'post',
            data: video
        })
    },

    /**
     * 根据id删除小节
     * @param {小节id}} chapterId 
     * @returns 
     */
    deleteVideo(videoId){
        return request({
            url: '/eduservice/video/' + videoId,
            method: 'delete'
        })
    },

    /**
     * 修改小节
     * @param {小节表单} video 
     * @returns 
     */
    editVideo(video){
        return request({
            url: '/eduservice/video/updateVideo',
            method: 'post',
            data: video
        })
    },

    /**
     * 通过小节id查询信息
     * @param {小节id} id 
     * @returns 
     */
    getVideoBackInfo(id){
        return request({
            url: '/eduservice/video/getVideoById/' + id,
            method: 'get'
        })
    }


}
